{layout name="main"/}
<div class="wrapper wrapper-content animated fadeInUp">


    <div class="row">
        <div class="col-sm-12">
            <div class="ibox">

                <div class="ibox-title">
                    <h5>会员列表</h5>
                </div>

                <div class="ibox-content">
                    <div class="row m-b-sm m-t-sm">
                        <div class="col-sm-8">

                              <div class="btn-group">
                                <a href="{:url('admin/User/getMyRecommendList',['user_status'=>$user_status,'rec_or_reg'=>$rec_or_reg])}" class="btn {if condition=" $account_type==-1 "}btn-primary{else}btn-white{/if} btn-sm" type="button">全部</a>
                                <a href="{:url('admin/User/getMyRecommendList',['user_status'=>$user_status,'account_type'=>1,'rec_or_reg'=>$rec_or_reg])}" class="btn {if condition=" $account_type==1 "}btn-primary{else}btn-white{/if} btn-sm" type="button">理财卡会员</a>
                                <a href="{:url('admin/User/getMyRecommendList',['user_status'=>$user_status,'account_type'=>0,'rec_or_reg'=>$rec_or_reg])}" class="btn {if condition=" $account_type==0 "}btn-primary{else}btn-white{/if} btn-sm" type="button">普通卡会员</a>

                            </div>
                            <div class="btn-group">
                                <a href="{:url('admin/User/getMyRecommendList',['account_type'=>$account_type,'rec_or_reg'=>$rec_or_reg])}" class="btn {if condition=" $user_status==-1 "}btn-primary{else}btn-white{/if} btn-sm" type="button">全部</a>
                                <a href="{:url('admin/User/getMyRecommendList',['account_type'=>$account_type,'user_status'=>1,'rec_or_reg'=>$rec_or_reg])}" class="btn {if condition=" $user_status==1 "}btn-primary{else}btn-white{/if} btn-sm" type="button">已认证</a>
                                <a href="{:url('admin/User/getMyRecommendList',['account_type'=>$account_type,'user_status'=>0,'rec_or_reg'=>$rec_or_reg])}" class="btn {if condition=" $user_status==0 "}btn-primary{else}btn-white{/if} btn-sm" type="button">未认证</a>
                                <a href="{:url('admin/User/getMyRecommendList',['account_type'=>$account_type,'user_status'=>2,'rec_or_reg'=>$rec_or_reg])}" class="btn {if condition=" $user_status==2 "}btn-primary{else}btn-white{/if} btn-sm" type="button">被冻结</a>

                            </div>
							<div class="btn-group">
                                <a href="{:url('admin/User/getMyRecommendList',['user_status'=>$user_status,'account_type'=>$account_type])}" class="btn {if condition=" $rec_or_reg==0 "}btn-primary{else}btn-white{/if} btn-sm" type="button">全部</a>
                                <a href="{:url('admin/User/getMyRecommendList',['user_status'=>$user_status,'account_type'=>$account_type,'rec_or_reg'=>1])}" class="btn {if condition=" $rec_or_reg==1 "}btn-primary{else}btn-white{/if} btn-sm" type="button">直推会员</a>
                                <a href="{:url('admin/User/getMyRecommendList',['user_status'=>$user_status,'account_type'=>$account_type,'rec_or_reg'=>2])}" class="btn {if condition=" $rec_or_reg==2 "}btn-primary{else}btn-white{/if} btn-sm" type="button">注册会员</a>
                            </div>
                        </div>


                        <div class="col-sm-4">
                            <div class="input-group">
                                <input type="text" placeholder="搜索(会员编号,会员昵称，手机号码)" class="input-sm form-control" name=keyword value="{$keyword}"> <span class="input-group-btn">
                                    <button type="button" class="btn btn-sm btn-primary" onclick="search()">搜索</button> </span>
                            </div>
                        </div>
                    </div>
                    <div class="profile-content">
                        <table class="footable table table-stripped toggle-arrow-tiny">
                            <thead>
                                <tr>

                                    <th  style="width: 18%;">会员编号/昵称</th>
									<th  style="width: 18%;">推荐人编号/昵称</th>
                                    <th  style="width: 8%;">手机号码</th>
                                    <th  style="width: 8%;">会员等级</th>
                                    <th  style="width: 12%;">注册时间</th>
                                    <th  style="width: 5%;">状态</th>

                                    <th data-hide="all">开户行</th>
                                    <th data-hide="all">银行卡号</th>
                                    <th data-hide="all">开户姓名</th>
                                    <th data-hide="all">开户支行</th>

                                </tr>
                            </thead>

                            <!--                            <tbody><tr class="no-records-found"><td colspan="8">没有找到匹配的记录</td></tr></tbody>-->

                            <tbody>
                              {:table_empty_list($list,'暂无数据!',10)}

                              {volist name="list" id="user"}
                                <tr>

                                    <td>
                                        <span class="footable-toggle"></span>
                                        {$user->user_uniid}/{$user->user_name}
                                    </td>
                                    <td>
                                        {$user->parent_user->user_uniid}/{$user->parent_user->user_name}
                                    </td>
                                    <td class="center ">{$user->phone}</td>
                                    <td class="center ">{$user->account_type}</td>
                                    <td class="center ">{$user->create_time}</td>
                                    <td class="center"><span class="badge badge {switch name="user.user_status"}{case value="已认证"}badge-primary{/case}{case value="已冻结"}{/case}{case value="未认证"}badge-danger{/case}{/switch}">{$user->user_status}</span></td>

                                    <td>{$user->vaild_card->bank_name}</td>
                                    <td><span class="pie">{$user->vaild_card->card_number}</span></td>
                                    <td>{$user->vaild_card->card_name}</td>
                                    <td>{$user->vaild_card->card_sub_bank}</td>

                                </tr>
                                {/volist}



                            </tbody>

                        </table>
                        <!--                        <div class="row">
                                                    <div class="col-sm-6 m-t-sm">
                                                        <button class="btn btn-primary btn-xs" id="selectAll" onclick="deletearticle(1)"><i class="fa fa-check"></i> 全选 </button>
                                                        <button class="btn btn-warning btn-xs" id="deleteAll" onclick="deletearticle(1)"><i class="fa fa-trash"></i> 批量删除 </button>
                                                    </div>
                                                </div>-->
                                                <div class="row">
                                                    <div class="col-sm-6">
                                                        <div class="dataTables_info" id="DataTables_Table_0_info" role="alert" aria-live="polite" aria-relevant="all">
                                                            每页显示 {:getPageSize()} 项，共 {$list->toArray()['total']} 项</div></div>
                                                    <div class="col-sm-6">
                                                        <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
                                                            {$list->render()}

                                                        </div>

                                                    </div>
                                                </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>

<script>
$(document).ready(function () {
    $(".footable").footable();
});


    function search() {
        var url = "{:url('admin/User/getMyRecommendList',['user_status'=>$user_status,'account_type'=>$account_type],'')}";
        var keyword = $("input[name=keyword]").val();
        if (keyword != "") {
            url = url + "/keyword/" + keyword;
        }
        toUrl(url);
    }


</script>
